﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Laugh.Data
{
    public interface IUnitOfWork// : IDisposable
    {
        //void RegisterUpdate(IEntity entity, IRepositoryBase repository);
        //void RegisterAdded(IEntity entity, IRepositoryBase repository);
        //void RegisterDeleted(IEntity entity, IRepositoryBase repository);

        ///// <summary>
        ///// 提交事务
        ///// </summary>
        ///// <returns>key实体,value为Id</returns>
        //IDictionary<IEntity, long> Commit();

        ///// <summary>
        ///// 提交事务
        ///// </summary>
        ///// <param name="isolationLevel">事务级别</param>
        ///// <returns>key实体,value为Id</returns>
        //IDictionary<IEntity, long> Commit(IsolationLevel isolationLevel);

        ///// <summary>
        ///// 数据库上下文(NHibernate为ISession,EF叫DBContext)
        ///// </summary>
        //IDisposable SessionOrDBContext { get; set; }
    }
}
